<!DOCTYPE html>
<html>
{include file="public/head" /}
<style>
    table {
        table-layout: fixed;
    }


    td {
		font-size:12px;

        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
    }
</style>
<body class="zanpian-body">
<section class="content">
<div class="row">
<div class="col-md-12">
<div class="callout callout-title">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
                <h4>{$nav.title}</h4>
                {notempty name="nav.remark"}
                <p>{$nav.remark}</p>
                {/notempty}
</div>
          <div class="nav-tabs-custom">
             <ul class="nav nav-tabs">
            <li class="active"><a href="#tab_1" data-toggle="tab">伪静态配置</a></li>  
            <li><a href="#tab_2" data-toggle="tab">伪静态规则生成</a></li>          
            </ul>          
            
<div class="panel-body">
    <div class="tab-content tab-fade fade active in" id="tab_1">
     <form id="myform" class="myform form-horizontal" method="post" load="no" action="{:url('up')}"> 
    {volist name="list" id="item"}
    {switch name="item['type']"}
    {case value="password"}
               <div class="input-group margin" {notempty name="item['other']"}id="{$item['other']}"{else /}id="{$item['name']}"{/notempty}>
                <div class="input-group-btn">
                  <span  class="btn btn-default form-txt">{neq name="item['type']" value="tags"}{$item['title']}：{/neq}</span>
                </div>
                <!-- /btn-group -->
                
                <input type="password" class="form-control form-txt {$item['style']}" name="{$item.class}[{$item['name']}]" value="{$item['value']}"  autocomplete="off"  required="required" placeholder="{$item.remark}" data-tip="{$item.remark}">
              </div>
              {/case}              
     {case value="textarea"}
               <div class="input-group margin" {notempty name="item['other']"}id="{$item['other']}"{else /}id="{$item['name']}"{/notempty}>
               <div class="input-group-btn">
               <span class="btn btn-default form-txt" style=" position:absolute;top:0px;">{neq name="item['type']" value="tags"}{$item['title']}：{/neq}</span>
                  <span class="form-txt-hide"></span>
                  </div>
                <!-- /btn-group -->
               <textarea class="form-control {$item['style']}" name="{$item.class}[{$item['name']}]"  {eq name="item['name']" value="url_rewrite_route"}rows="20"{else/}rows="5"{/eq} data-tip="{$item.remark}">{$item['value']}</textarea>
              </div>
              {/case}
     {case value="num"}
                <div class="input-group margin" {notempty name="item['other']"}id="{$item['other']}"{else /}id="{$item['name']}"{/notempty}>
                <div class="input-group-btn">
                  <span class="btn btn-default form-txt">{neq name="item['type']" value="tags"}{$item['title']}：{/neq}</span>
                </div>
                <!-- /btn-group -->
                <input type="text" class="form-control {$item['style']}" name="{$item.class}[{$item['name']}]" value="{$item['value']}"  autocomplete="off"  data-tip="{$item.remark}" style="text-align:center">                  
              </div> 
              {/case}              
      {case value="notextarea"}
               <div class="input-group margin" {notempty name="item['other']"}id="{$item['other']}"{else /}id="{$item['name']}"{/notempty}>
               <div class="input-group-btn">
               <span class="btn btn-default form-txt" style=" position:absolute;top:0px;">{neq name="item['type']" value="tags"}{$item['title']}：{/neq}</span>
                  <span class="form-txt-hide"></span>
                  </div>
                <!-- /btn-group -->
               <textarea class="form-control {$item['style']}" name="{$item.class}[{$item['name']}]"  rows="5" data-tip="{$item.remark}">{$item['value']}</textarea>
              </div>
              {/case}
      {case value="select"}
               <div class="input-group margin" {notempty name="item['other']"}id="{$item['other']}"{else /}id="{$item['name']}"{/notempty}>
                <div class="input-group-btn">
                  <span class="btn btn-default form-txt">{neq name="item['type']" value="tags"}{$item['title']}：{/neq}</span>
                </div>
                <!-- /btn-group -->
              <div class="select-group w40">
 			<select  name="{$item.class}[{$item['name']}]"  class="form-control select2 {$item['style']}" data-tip="{$item.remark}" style="width:100%">
			{volist name=":parse_config_attr($item['extra'])" id="vo"}
			<option value="{$key}" {eq name="item['value']" value="$key"}selected{/eq}>{$vo}</option>
			{/volist}
			</select> 
            </div> 
              <span data-tip="{$item.remark}" class="tips">{$item.remark}</span>         
              </div>
              {/case} 
      {case value="bool"}
               <div class="input-group margin" {notempty name="item['other']"}id="{$item['other']}"{else /}id="{$item['name']}"{/notempty}>
                <div class="input-group-btn">
                  <span  class="btn btn-default form-txt">{neq name="item['type']" value="tags"}{$item['title']}：{/neq}</span>
                </div>
                <!-- /btn-group -->
 			<select  name="{$item.class}[{$item['name']}]"  class="form-control select2 {$item['style']}" data-tip="{$item.remark}">
			{volist name=":parse_config_attr($item['extra'])" id="vo"}
			<option value="{$key}" {eq name="item['value']" value="$key"}selected{/eq}>{$vo}</option>
			{/volist}              
                </select>
              </div>
              {/case}                                          
       {case value="pctheme"}
               <div class="input-group margin" {notempty name="item['other']"}id="{$item['other']}"{else /}id="{$item['name']}"{/notempty}>
                <div class="input-group-btn">
                  <span class="btn btn-default form-txt">{neq name="item['type']" value="tags"}{$item['title']}：{/neq}</span>
                </div>
                <!-- /btn-group -->
			<select name="{$item.class}[{$item['name']}]" class="form-control select2 {$item['style']}" data-tip="{$item.remark}">
			{if isset($homedir)}{volist name="homedir" id="admin"}
            <option value="{$admin.filename}" {eq name="admin.filename" value="$item['value']"}selected{/eq}>{$admin.filename}</option>{/volist}{/if}
			</select>
              </div>
              {/case}   
        {case value="mobiletheme"}
               <div class="input-group margin" {notempty name="item['other']"}id="{$item['other']}"{else /}id="{$item['name']}"{/notempty}>
                <div class="input-group-btn">
                  <span class="btn btn-default form-txt">{neq name="item['type']" value="tags"}{$item['title']}：{/neq}</span>
                </div>
                <!-- /btn-group -->
			<select name="{$item.class}[{$item['name']}]" class="form-control select2 {$item['style']}" data-tip="{$item.remark}">
			{if isset($homedir)}{volist name="homedir" id="admin"}<option value="{$admin.filename}" {eq name="admin.filename" value="$item['value']"}selected{/eq}>{$admin.filename}</option>{/volist}{/if}
			</select>
              </div>
              {/case} 
         {case value="usertheme"}
               <div class="input-group margin" {notempty name="item['other']"}id="{$item['other']}"{else /}id="{$item['name']}"{/notempty}>
                <div class="input-group-btn">
                  <span class="btn btn-default form-txt">{neq name="item['type']" value="tags"}{$item['title']}：{/neq}</span>
                </div>
                <!-- /btn-group -->
			<select name="{$item.class}[{$item['name']}]" class="form-control select2 {$item['style']}" data-tip="{$item.remark}">
			{if isset($userdir)}{volist name="userdir" id="admin"}<option value="{$admin.name}" {eq name="admin.name" value="$item['value']"}selected{/eq}>{$admin.name}</option>{/volist}{/if}
			</select>
              </div>
              {/case} 
                {default /}   
                <div class="input-group margin" {notempty name="item['other']"}id="{$item['other']}"{else /}id="{$item['name']}"{/notempty}>
                <div class="input-group-btn">
                  <span class="btn btn-default form-txt">{neq name="item['type']" value="tags"}{$item['title']}：{/neq}</span>
                </div>
                <!-- /btn-group -->
                <input type="text" class="form-control {$item['style']}" name="{$item.class}[{$item['name']}]" value="{$item['value']}"  autocomplete="off"  data-tip="{$item.remark}">
                {eq name="item['name']" value="cache_prefix"}
                <span class="input-group-btn" style="float:left">
                     <span  class="btn btn-primary btn-flat" id='{$item['name']}_click'>随机</span>
                    </span>
                {/eq} 
                {eq name="item['name']" value="cache_password"}
                <span class="input-group-btn" style="float:left">
                     <span class="btn btn-primary btn-flat" id='{$item['name']}_click' data-url="{:url('check_cache')}">点击测试</span>
                    </span>
                {/eq}                   
              </div>                                                                        
              {/switch}             
               {/volist}
            
<div class="callout">
                <p>每行一条规则, 中间使用分号:隔开, 左边为系统默认 URL 路径, 右边为替换后的 URL 路径</p>
                <p>(#num)为数字变量 (#char)为字符串变量</p>
                <p>($变量名称),该参数为对应左边变量参数前面的名变量</p>
</div> 
                         
                                  <div class="layui-layer-footer">
            <div  class="footer-btn">
               <button type="submit" class="btn btn-success btn-embossed">修改</button>
               <button type="reset" class="btn btn-default btn-embossed">重置</button>
            </div>
       </div> 
        </form> 
            </div>

            <div class="tab-content tab-fade fade" id="tab_2">
  <table id="table ids" class="table table-striped table-bordered table-hover" width="100%">
                  <thead>
                    <tr style="height:45px;">
                      <th style="text-align:center;vertical-align: middle;">编号</th>
                      <th style="text-align:center;vertical-align: middle;">伪静态格式</th>
                      <th style="text-align:center;vertical-align: middle;">支持环境和说明</th>
                      <th style="text-align:center;vertical-align: middle;">生成操作</th>
                    </tr>
                  </thead>
                  <tbody>
                    <tr cellpadding="7" >
                      <td colspan="4" align="center">
                      <p>必须开启伪静态重写并开启自定义路由规则并设置好自定义路由规则,并且系统自动生成了规则后才能使用</p>
                      <p style="color:#F00">生成的所有伪静态文保存在runtime/rewrite/中</p></td>
                    </tr>
                    <tr>
                      <td style="text-align:center;vertical-align: middle;">1.</td>
                      <td style="text-align:center;vertical-align: middle;"> .htaccess格式伪静态</td>
                      <td style="text-align:center;vertical-align: middle;">apache或者IIS6.0+Rewrite3的格式，一般将规则放到网站更目录</td>
                      <td style="text-align:center;vertical-align: middle;"><a href="{:url('create',array('id'=>1))}"  class="btn btn-success btn-add ajax-post">生成</a></td>
                    </tr>
                    <tr>
                      <td style="text-align:center;vertical-align: middle;">2.</td>
                      <td style="text-align:center;vertical-align: middle;"> .conf格式伪静态</td>
                      <td style="text-align:center;vertical-align: middle;">一般情况为nginx的伪静态格式，将文件内容复制到配置文件中</td>
                      <td style="text-align:center;vertical-align: middle;"><a href="{:url('create',array('id'=>2))}" class="btn btn-success btn-add ajax-post">生成</a></td>
                    </tr>
                    <tr>
                      <td style="text-align:center;vertical-align: middle;">3.</td>
                      <td style="text-align:center;vertical-align: middle;">httpd.ini格式伪静态</td>
                      <td style="text-align:center;vertical-align: middle;">一般情况为IIS6.0+Rewrite2的伪静态格式，一般放在网站根目录</td>
                      <td style="text-align:center;vertical-align: middle;"><a href="{:url('create',array('id'=>3))}" class="btn btn-success btn-add ajax-post">生成</a></td>
                    </tr>
                    <tr>
                      <td style="text-align:center;vertical-align: middle;">4.</td>
                      <td style="text-align:center;vertical-align: middle;">web.config格式伪静态</td>
                      <td style="text-align:center;vertical-align: middle;">一般情况为IIS7以上支持</td>
                      <td style="text-align:center;vertical-align: middle;">请使用.htaccess格式然后导入</td>
                    </tr>
                    <tr style="height:45px;" cellpadding="7" >
                      <td colspan="4"><p>1.请尽量将伪静态规则中自定义规则开头为变量参数的规则放到后面，将开头固定字符的规则放在开头,因为伪静态规则是冲上往下匹配所以如果开头为变量的规则容易引起下面其他规则的匹配。</p>
                        <br />
                        <p>1.生成的规则不能保证100%都能匹配成功，具体容易出现错误就是上面一条所说的规则出现相同的情况了匹配到一个页面中去了，或者出现404<br />
                          <br />
                          如果有规则不生效，你可以自己修改生成规则中的规则顺序或者修改规则。</p>
                        <br />
                        <p>2.生成的所有伪静态文保存在runtime/rewrite/中请更具你的环境选择相应规则到你环境中的伪静态文件中,该程序不能保证生成的规则完全能正常使用但是能生成绝大部分的规则</p></td>
                    </tr>
                  </tbody>
                </table>            
            
            
            
            
            
            </div>
           <!-- /.tab-content --> 
         </div>
         <!-- /.panel-body --> 

               
          </div>
          <!-- /.nav-tabs-custom -->
        </div>
        </div>
        </section>
{include file="public/footer" /}
<script type="text/javascript">
$(document).ready(function(){
	zanpian.cms.all();					   
});	
</script>
</body>
</html>
